package com.bestcem.xm.txtanls.grpc.service.param;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 文本分析项目训练字段入参校验
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/5/10-17:59
 */
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
public class TextFieldParam {

    /**
     * 训练字段id
     */
    @NotBlank(message = "训练字段id错误")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "训练字段id错误")
    private String id;

    /**
     * 训练字段名
     */
    @NotBlank(message = "训练字段名不能为空")
    private String value;
}
